package com.lanqiao.attendance.mapper;

import com.lanqiao.attendance.pojo.Attendance;
import com.lanqiao.attendance.vo.AttendanceVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AttendanceMapper {
    Attendance queryById(Long id);

    Attendance findById(Long stuId,Long courseId);

    List<Attendance> queryByCourseNum(Long courseId);

    List<Attendance> queryAll();

    int batchInsert(List<Attendance> attendances);

    int update(  @Param("stuId") Long stuId, @Param("courseId") Long courseId);

    int delete(Long stuId,Long courseId);

    int attendanceCount(Long courseId,String status);

    List<AttendanceVo> queryStudentAttendance(@Param("courseId") Long courseId);
}
